<?php

namespace App\Logic\point;

use Illuminate\Support\Facades\Cache;
use Xrjyz\Curl\Curl;

class Point
{

    public static function curl(){
        $new_api_config = [
            'url' => 'https://admin.dianduidian.tech/api_index',
        ];
        $curl = new Curl;
        $curl->post('app','finger')
            ->url($new_api_config['url']);
        if ($curl->error()) {
            return e_msg(300009,$curl->message());
        }

        if($curl->info()['http_code'] == 200){

            $content = $curl->data();
            $info = json_decode($content,true);
            return s_msg('',$info);

        }else{
            return e_msg(300009,'响应异常'.$curl->info()['http_code']);
        }
    }


}





